import request from '@/utils/request'

export default {
    // 分页查询
    // page:当前页, limit:每页的记录数
    selectByPage(page, limit) {
        return request({
          url: `/rbac/user/selectByPage?page=${page}&limit=${limit}`,
          method: 'get'
        })
    },
    deleteById(id) {
        return request({
          url: `/rbac/user/deleteById/${id}`,
          method: 'delete'
        })
    },
    add(user) {
      return request({
        url: `/rbac/user/add`,
        method: 'post',
        data: user
      })
    },
    selectById(id) {
      return request({
        url: `/rbac/user/selectById/${id}`,
        method: 'get'
      })
    },
    update(user) {
      return request({
        url: `/rbac/user/update`,
        method: 'put',
        data: user
      })
    },
    updateStatus(id, status) {
      return request({
        url: `/rbac/user/updateStatus/${id}/${status}`,
        method: 'put'
      })
    },
}

// page:当前页, limit:每页的记录数
/* export function selectByPage(page, limit) {
  return request({
    url: `/rbac/user/selectByPage?page=${page}&limit=${limit}`,
    method: 'get'
  })
} */